package per.com.bean;

import java.io.Serializable;
import java.util.List;

/**
 * Created by wubihang on 2018/7/16.
 */
public class BaseBean<T> implements Serializable {

    private int resultCode;// 返回结果，0为成功
    private String message;// 返回信息 ，success，fail+错误信息
    private T data;// 返回单个对象
    private List<T> datas;// 返回集合对象

    public BaseBean() {

    }

    public BaseBean(int resultCode) {
        this.resultCode = resultCode;
    }

    public BaseBean(int resultCode, String message) {
        this.resultCode = resultCode;
        this.message = message;
    }

    public BaseBean(int resultCode, String message, T data) {
        this.resultCode = resultCode;
        this.message = message;
        this.data = data;
    }

    public BaseBean(int resultCode, String message, List<T> datas) {
        this.resultCode = resultCode;
        this.message = message;
        this.datas = datas;
    }

    public BaseBean(int resultCode, String message, T data, List<T> datas) {
        this.resultCode = resultCode;
        this.message = message;
        this.data = data;
        this.datas = datas;
    }

    public int getResultCode() {
        return resultCode;
    }

    public void setResultCode(int resultCode) {
        this.resultCode = resultCode;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public List<T> getDatas() {
        return datas;
    }

    public void setDatas(List<T> datas) {
        this.datas = datas;
    }
}
